home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIProcess.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  7KB  |  198 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIProcess.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIProcess_h__
  6. #define __gen_nsIProcess_h__
  7.  
  8.  
  9. #ifndef __gen_nsIFile_h__
  10. #include "nsIFile.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsISupports_h__
  14. #include "nsISupports.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21.  
  22. /* starting interface:    nsIProcess */
  23. #define NS_IPROCESS_IID_STR "9da0b650-d07e-4617-a18a-250035572ac8"
  24.  
  25. #define NS_IPROCESS_IID \
  26.   {0x9da0b650, 0xd07e, 0x4617, \
  27.     { 0xa1, 0x8a, 0x25, 0x00, 0x35, 0x57, 0x2a, 0xc8 }}
  28.  
  29. class NS_NO_VTABLE nsIProcess : public nsISupports {
  30.  public: 
  31.  
  32.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROCESS_IID)
  33.  
  34.   /* void init (in nsIFile executable); */
  35.   NS_IMETHOD Init(nsIFile *executable) = 0;
  36.  
  37.   /* void initWithPid (in unsigned long pid); */
  38.   NS_IMETHOD InitWithPid(PRUint32 pid) = 0;
  39.  
  40.   /* void kill (); */
  41.   NS_IMETHOD Kill(void) = 0;
  42.  
  43.   /** XXX what charset? **/
  44. /** Executes the file this object was initialized with
  45.          * @param blocking Whether to wait until the process terminates before returning or not
  46.          * @param args An array of arguments to pass to the process
  47.          * @param count The length of the args array
  48.          * @return the PID of the newly spawned process */
  49.   /* unsigned long run (in boolean blocking, [array, size_is (count)] in string args, in unsigned long count); */
  50.   NS_IMETHOD Run(PRBool blocking, const char **args, PRUint32 count, PRUint32 *_retval) = 0;
  51.  
  52.   /* readonly attribute nsIFile location; */
  53.   NS_IMETHOD GetLocation(nsIFile * *aLocation) = 0;
  54.  
  55.   /* readonly attribute unsigned long pid; */
  56.   NS_IMETHOD GetPid(PRUint32 *aPid) = 0;
  57.  
  58.   /* readonly attribute string processName; */
  59.   NS_IMETHOD GetProcessName(char * *aProcessName) = 0;
  60.  
  61.   /* readonly attribute unsigned long processSignature; */
  62.   NS_IMETHOD GetProcessSignature(PRUint32 *aProcessSignature) = 0;
  63.  
  64.   /* readonly attribute long exitValue; */
  65.   NS_IMETHOD GetExitValue(PRInt32 *aExitValue) = 0;
  66.  
  67. };
  68.  
  69. /* Use this macro when declaring classes that implement this interface. */
  70. #define NS_DECL_NSIPROCESS \
  71.   NS_IMETHOD Init(nsIFile *executable); \
  72.   NS_IMETHOD InitWithPid(PRUint32 pid); \
  73.   NS_IMETHOD Kill(void); \
  74.   NS_IMETHOD Run(PRBool blocking, const char **args, PRUint32 count, PRUint32 *_retval); \
  75.   NS_IMETHOD GetLocation(nsIFile * *aLocation); \
  76.   NS_IMETHOD GetPid(PRUint32 *aPid); \
  77.   NS_IMETHOD GetProcessName(char * *aProcessName); \
  78.   NS_IMETHOD GetProcessSignature(PRUint32 *aProcessSignature); \
  79.   NS_IMETHOD GetExitValue(PRInt32 *aExitValue); 
  80.  
  81. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  82. #define NS_FORWARD_NSIPROCESS(_to) \
  83.   NS_IMETHOD Init(nsIFile *executable) { return _to Init(executable); } \
  84.   NS_IMETHOD InitWithPid(PRUint32 pid) { return _to InitWithPid(pid); } \
  85.   NS_IMETHOD Kill(void) { return _to Kill(); } \
  86.   NS_IMETHOD Run(PRBool blocking, const char **args, PRUint32 count, PRUint32 *_retval) { return _to Run(blocking, args, count, _retval); } \
  87.   NS_IMETHOD GetLocation(nsIFile * *aLocation) { return _to GetLocation(aLocation); } \
  88.   NS_IMETHOD GetPid(PRUint32 *aPid) { return _to GetPid(aPid); } \
  89.   NS_IMETHOD GetProcessName(char * *aProcessName) { return _to GetProcessName(aProcessName); } \
  90.   NS_IMETHOD GetProcessSignature(PRUint32 *aProcessSignature) { return _to GetProcessSignature(aProcessSignature); } \
  91.   NS_IMETHOD GetExitValue(PRInt32 *aExitValue) { return _to GetExitValue(aExitValue); } 
  92.  
  93. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  94. #define NS_FORWARD_SAFE_NSIPROCESS(_to) \
  95.   NS_IMETHOD Init(nsIFile *executable) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(executable); } \
  96.   NS_IMETHOD InitWithPid(PRUint32 pid) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithPid(pid); } \
  97.   NS_IMETHOD Kill(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Kill(); } \
  98.   NS_IMETHOD Run(PRBool blocking, const char **args, PRUint32 count, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Run(blocking, args, count, _retval); } \
  99.   NS_IMETHOD GetLocation(nsIFile * *aLocation) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocation(aLocation); } \
  100.   NS_IMETHOD GetPid(PRUint32 *aPid) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPid(aPid); } \
  101.   NS_IMETHOD GetProcessName(char * *aProcessName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProcessName(aProcessName); } \
  102.   NS_IMETHOD GetProcessSignature(PRUint32 *aProcessSignature) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProcessSignature(aProcessSignature); } \
  103.   NS_IMETHOD GetExitValue(PRInt32 *aExitValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExitValue(aExitValue); } 
  104.  
  105. #if 0
  106. /* Use the code below as a template for the implementation class for this interface. */
  107.  
  108. /* Header file */
  109. class nsProcess : public nsIProcess
  110. {
  111. public:
  112.   NS_DECL_ISUPPORTS
  113.   NS_DECL_NSIPROCESS
  114.  
  115.   nsProcess();
  116.  
  117. private:
  118.   ~nsProcess();
  119.  
  120. protected:
  121.   /* additional members */
  122. };
  123.  
  124. /* Implementation file */
  125. NS_IMPL_ISUPPORTS1(nsProcess, nsIProcess)
  126.  
  127. nsProcess::nsProcess()
  128. {
  129.   /* member initializers and constructor code */
  130. }
  131.  
  132. nsProcess::~nsProcess()
  133. {
  134.   /* destructor code */
  135. }
  136.  
  137. /* void init (in nsIFile executable); */
  138. NS_IMETHODIMP nsProcess::Init(nsIFile *executable)
  139. {
  140.     return NS_ERROR_NOT_IMPLEMENTED;
  141. }
  142.  
  143. /* void initWithPid (in unsigned long pid); */
  144. NS_IMETHODIMP nsProcess::InitWithPid(PRUint32 pid)
  145. {
  146.     return NS_ERROR_NOT_IMPLEMENTED;
  147. }
  148.  
  149. /* void kill (); */
  150. NS_IMETHODIMP nsProcess::Kill()
  151. {
  152.     return NS_ERROR_NOT_IMPLEMENTED;
  153. }
  154.  
  155. /* unsigned long run (in boolean blocking, [array, size_is (count)] in string args, in unsigned long count); */
  156. NS_IMETHODIMP nsProcess::Run(PRBool blocking, const char **args, PRUint32 count, PRUint32 *_retval)
  157. {
  158.     return NS_ERROR_NOT_IMPLEMENTED;
  159. }
  160.  
  161. /* readonly attribute nsIFile location; */
  162. NS_IMETHODIMP nsProcess::GetLocation(nsIFile * *aLocation)
  163. {
  164.     return NS_ERROR_NOT_IMPLEMENTED;
  165. }
  166.  
  167. /* readonly attribute unsigned long pid; */
  168. NS_IMETHODIMP nsProcess::GetPid(PRUint32 *aPid)
  169. {
  170.     return NS_ERROR_NOT_IMPLEMENTED;
  171. }
  172.  
  173. /* readonly attribute string processName; */
  174. NS_IMETHODIMP nsProcess::GetProcessName(char * *aProcessName)
  175. {
  176.     return NS_ERROR_NOT_IMPLEMENTED;
  177. }
  178.  
  179. /* readonly attribute unsigned long processSignature; */
  180. NS_IMETHODIMP nsProcess::GetProcessSignature(PRUint32 *aProcessSignature)
  181. {
  182.     return NS_ERROR_NOT_IMPLEMENTED;
  183. }
  184.  
  185. /* readonly attribute long exitValue; */
  186. NS_IMETHODIMP nsProcess::GetExitValue(PRInt32 *aExitValue)
  187. {
  188.     return NS_ERROR_NOT_IMPLEMENTED;
  189. }
  190.  
  191. /* End of implementation class template. */
  192. #endif
  193.  
  194. #define NS_PROCESS_CONTRACTID "@mozilla.org/process/util;1"
  195. #define NS_PROCESS_CLASSNAME "Process Specification"
  196.  
  197. #endif /* __gen_nsIProcess_h__ */
  198.